<header class="header" itemscope itemtype="http://schema.org/WPHeader">
    <div class="slimContent">
      <div class="navbar-header">
        {{- if and (.Site.Params.profile) (.Site.Params.profile.enabled)}}
        {{- $profile := .Site.Params.profile }}
        <div class="profile-block text-center">
          <a id="avatar" href="{{- $profile.follow }}" target="{{ cond (eq $profile.follow "/") "" "_blank" }}">
            <img class="img-circle img-rotate" src="{{- $profile.avatar | absURL }}" width="200" height="200">
          </a>
          <h2 id="name" class="hidden-xs hidden-sm">{{- $profile.author }}</h2>
          <h3 id="title" class="hidden-xs hidden-sm hidden-md">{{- $profile.author_title }}</h3>
          <small id="location" class="text-muted hidden-xs hidden-sm"><i class="icon icon-map-marker"></i> {{- $profile.location }}</small>
        </div>
        {{- end }}
        {{- partial "search.html" . }}
        <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#main-navbar" aria-controls="main-navbar" aria-expanded="false">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
      </div>
      <nav id="main-navbar" class="collapse navbar-collapse" itemscope itemtype="http://schema.org/SiteNavigationElement" role="navigation">
        <ul class="nav navbar-nav main-nav {{- with .Site.Params.config.menu_highlight }}  menu-highlight {{- end}}">
          {{- $icon := .Site.Params.menuIcons }}
          {{- range .Site.Menus.main -}}
            {{- $lowerItemName := lower .Name}}
            <li class="menu-item menu-item-{{- $lowerItemName}}">
                <a href="{{- .URL | safeURL }}">
                  {{- with $icon.enable }}
                  {{- range $name,$value := $icon}}
                    {{- if eq $name $lowerItemName }}
                    <i class="icon {{- print " " $value }}"></i>
                    {{- end}}
                  {{- end }}
                  {{- end}}
                  <span class="menu-title">{{- .Title  }}</span>
                </a>
            </li>
          {{- end}}
        </ul>
      </nav>
    </div>
  </header>

